#ifdef OSGI_USE_15S_HEADER
#include "../interface/InterfaceDef.h"
#include "osgi-core/osgi-predefined.h"
#else // OSGI_USE_15S_HEADER
#ifndef OSGI_CORE_IBundle_h__
#define OSGI_CORE_IBundle_h__

#include "osgi-predefined.h"

/*
#define BUNDLE_LOADED_STATE			1
#define BUNDLE_UNLOAD_STATE			2
#define BUNDLE_INSTALLED_STATE		3
#define BUNDLE_RESOLVED_STATE		4
#define BUNDLE_RESOLVING_STATE      5
#define BUNDLE_ACTIVATED_STATE		6
#define BUNDLE_STARTED_STATE		7
#define BUNDLE_STARTING_STATE		8
#define BUNDLE_STOPPED_STATE		9
#define BUNDLE_STOPPING_STATE		10
#define BUNDLE_UNINSTALLED_STATE	11
#define BUNDLE_UNINSTALLING_STATE   12
#define BUNDLE_UPDATED_STATE		13
*/

#define BUNDLE_INSTALLED_STATE			1
#define BUNDLE_RESOLVED_STATE			2
#define BUNDLE_STARTING_STATE      		3
#define BUNDLE_ACTIVE_STATE				4
#define BUNDLE_STOPPING_STATE			5
#define BUNDLE_UNINSTALLED_STATE		6

OSGI_NAMESPACE_BEGIN

OSGI_INTERFACE IBundle
{
	virtual ~IBundle() {}
	virtual int OSGI_API GetContext(IBundleContext** ppContext) = 0;
	virtual int OSGI_API GetName(const char** ppName) = 0;
	virtual int OSGI_API GetManifest(IManifest** ppManifest) = 0;
	virtual int OSGI_API GetState(int* state) = 0;
	virtual int OSGI_API Start() = 0;
	virtual int OSGI_API Stop() = 0;
	virtual int OSGI_API UnLoad() = 0;
	virtual void OSGI_API Translate(const char *langTag, const char *key, char **val, unsigned int &len) = 0;
	virtual int OSGI_API GetRunningPath(char** ppBundleAppPath) = 0; 
	virtual int OSGI_API GetInstallPath(char** ppBundleInstallPath) = 0; 
};

OSGI_NAMESPACE_END

#endif // OSGI_CORE_IBundle_h__
#endif // OSGI_USE_15S_HEADER
